var frisby = require('frisby');

frisby.create('获取电子任务书接口')
  .post('http://192.168.247.88:9090/hub/flight/getTask_xml', {
      'device-udid':'092700B6-2E6F-45D7-B55D-AEFACED48DDC',
 	    'DatopBTime':'2013-10-30T14:33:36+08:00',//起始时间   不能为空
 	    'DatopETime':'2013-11-1T14:33:36+08:00',//结束时间   不能为空
      'filghtno':'FDCB'//航班号   不能为空
    })

    // .inspectJSON()
  .expectJSONTypes({
    'ResponseInfo':{
           "Result": String,//
           "ErrorInfo": String
         }})
   .expectJSONTypes({
     'Data':{
            "YHJZPB": Array
          }})

     .expectJSONTypes('Data.YHJZPB.?', {
                  "DATOP": String,//"2015-01-27  08:11 ",
	                "FLTIDS": String,//"HU7207/HU7208",
	                "AC": String,//"B5428/B5428",
	                "DEP_TIMES": String,//"08:11 /12:10 ",
	                "ROUTES": String,//"TYN-PVG(英语通讯)/PVG-TYN(英语通讯)",
	                "MAINTAIN_STN": Array,//[],
	                "CN_ROUTES": String,//"英语通信",
	                "STCS": String,//"J/J",
	                "FLY_TIMES": String,//"266",
	                "ACCD": String,//"737－800（带头等）/737－800（带头",
	                "compid": String,//"1",
	                "CAPTAIN": String,//"赵波",
	                "CAPTAIN_REMARK": Array,//[],
	                "PILOT_CHECKER": Array,//[],
	                "INSPECTED_PILOT": Array,//[],
	                "CHECK_TYPE": Array,//[],
	                "SKIPPER1": Array,//[],
	                "SKIPPER1_REMARK": Array,//[],
	                "skipper2": Array,//[],
	                "skipper2_remark": Array,//[],
	                "FIRST_VICE1": String,//"郭智超(F2,ICAO 4)@由威(F3,ICAO 4)",
	                "FIRST_VICE1_REMARK": String,//"郭智超(F2,ICAO 4)@由威(F3,ICAO 4)",
	                "ACCOMPANY1": Array,//[],
	                "ACCOMPANY2": Array,//[],
	                "PILOT_DEADHEAD_OPS": Array,//[],
	                "PILOT_DEADHEAD_OTHER": Array,//[],
	                "CHIEF_STEWARD_CAPTAIN": Array,//[],
	                "CHIEF_STEWARD_CAPTAIN_REMARK": Array,//[],
	                "STEWARD_CAP1": String,//"李倩倩",
	                "STEWARD_CAP1_REMARK": Array//[]
                })
  .expectStatus(200)
.toss();
